<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">

  <title>Cocos Creator | MiniGame
  </title>

  <meta name="viewport"
    content="width=device-width,user-scalable=no,initial-scale=1,minimum-scale=1,maximum-scale=1,minimal-ui=true" />
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name="full-screen" content="yes" />
  <meta name="screen-orientation" content="portrait" />
  <meta name="x5-fullscreen" content="true" />
  <meta name="360-fullscreen" content="true" />
  <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />

  <meta name="renderer" content="webkit" />
  <meta name="force-rendering" content="webkit" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

  <link rel="stylesheet" type="text/css" href="style.css" />
  <link rel="icon" href="favicon.ico" />
</head>

<body>
  <h1 class="header">
    MiniGame
  </h1>

  <div id="GameDiv" cc_exact_fit_screen="false" style="width: 640px; height: 960px;">
    <div id="Cocos3dGameContainer">
      <canvas id="GameCanvas" width="640" height="960" tabindex="99"></canvas>
    </div>
  </div>
  <p class="footer">
    Created with <a href="https://www.cocos.com/products" title="Cocos Creator">Cocos Creator</a>
  </p>
  <!-- Polyfills bundle. -->
<script src="src/polyfills.bundle.js" charset="utf-8"> </script>

<!-- SystemJS support. -->
<script src="src/system.bundle.js" charset="utf-8"> </script>

<!-- Import map -->
<script src="src/import-map.json" type="systemjs-importmap" charset="utf-8"> </script>

<script>
    System.import('./index.js').catch(function(err) { console.error(err); })
</script>

</body>
<script>
  var urlParam = {};

  let href = window.location.href
  var whIndex = href.indexOf("?");
  if (whIndex != -1) {
    var param = href.slice(whIndex + 1).split("&");
    var strArr;
    for (var i = 0; i < param.length; i++) {
      strArr = param[i].split("=");
      urlParam[strArr[0]] = strArr[1];
    }
  }


  !urlParam[" ip"] && (urlParam["ip"] = 'ws://42.194.230.224')
  !urlParam["port"] && (urlParam["port"] = '9911')
  !urlParam["account"] && (urlParam["account"] = '1111')
   urlParam["proto"] = 1
</script>

</html>